package com.caseProcess.entity;

/**
 * @author kittlen
 * @version 1.0
 * @date 2020/11/16 16:12
 */
public class Page {
    private String table;//表名
    private String column;//按该列来进行分页
    private int colType;//column列的类型,0-数字类型,1-字符类型,2-日期时间类型
    private boolean order;//排序,0-顺序,1-倒序
    private String columnlist;//要查询出的字段列表,*表示全部字段
    private int pageSize;//每页记录数
    private int pageNum;//指定页
    private String where;//查询条件

    /**
     *
     * @param table 表名
     * @param column 按该列来进行分页
     * @param colType column列的类型,0-数字类型,1-字符类型,2-日期时间类型
     * @param order 排序,0-顺序,1-倒序
     * @param pageSize 每页记录数
     * @param pageNum 指定页
     */
    public Page(String table, String column, int colType, boolean order, int pageSize, int pageNum) {
        this.table = table;
        this.column = column;
        this.colType = colType;
        this.order = order;
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.columnlist="*";
        this.where="";
    }

    /**
     *
     * @param table 表名
     * @param column 按该列来进行分页
     * @param colType column列的类型,0-数字类型,1-字符类型,2-日期时间类型
     * @param order 排序,0-顺序,1-倒序
     * @param columnlist 要查询出的字段列表,*表示全部字段
     * @param pageSize 每页记录数
     * @param pageNum 指定页
     * @param where 查询条件
     */
    public Page(String table, String column, int colType, boolean order, String columnlist, int pageSize, int pageNum, String where) {
        this.table = table;
        this.column = column;
        this.colType = colType;
        this.order = order;
        this.columnlist = columnlist;
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.where = where;
    }

    /**
     *
     * @param table 表名
     * @param column 按该列来进行分页
     * @param pageSize 每页记录数
     * @param pageNum 指定页
     */
    public Page(String table, String column, int pageSize, int pageNum) {
        this.table = table;
        this.column = column;
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.colType=0;
        this.order=true;
        this.columnlist="*";
        this.where="";
    }

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public String getColumn() {
        return column;
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public int getColType() {
        return colType;
    }

    public void setColType(int colType) {
        this.colType = colType;
    }

    public boolean isOrder() {
        return order;
    }

    public void setOrder(boolean order) {
        this.order = order;
    }

    public String getColumnlist() {
        return columnlist;
    }

    public void setColumnlist(String columnlist) {
        this.columnlist = columnlist;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public String getWhere() {
        return where;
    }

    public void setWhere(String where) {
        this.where = where;
    }
}
